#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
    FILE* pf;
        if ((pf = fopen("D:\\code\\GRADE.DAT.txt", "r")) == NULL) {
            printf("file open error!\n");
            exit(0);
        }
    for (int i = 0; i < 10; i++) {
        int score=0;
        fscanf(pf, "%d", &score);
        printf("%d: ", score);
        if (score >= 90 && score <= 100) {
            printf("A\n");
        }
        else if (score >= 80 && score <= 89) {
            printf("B\n");
        }
        else if (score >= 70 && score <= 79) {
            printf("C\n");
        }
        else if (score >= 60 && score <= 69) {
            printf("D\n");
        }
        else {
            printf("F\n");
        }
    }
    fclose(pf);
    pf = NULL;
    return 0;
}